package org.hepeng.hope.entity

import java.io.Serializable
import javax.persistence.Embeddable
import javax.persistence.EmbeddedId
import javax.persistence.Entity
import javax.persistence.Index
import javax.persistence.Table
import org.hepeng.hope.entity.Entity as E


const val ROLE_AUTHORITY_TABLE_NAME = "role_authority"


@Entity
@Table(name = ROLE_AUTHORITY_TABLE_NAME , indexes = [Index(columnList = "roleId,authorityId")])
internal data class RoleAuthority(@EmbeddedId var pk: RoleAuthorityPK
) : Serializable

@Embeddable
internal data class RoleAuthorityPK(var roleId:Long , var authorityId: Long) : Serializable

